package com.zhangtai.modules.service.transfer;

import com.zhangtai.modules.entity.transfer.TransferInfoEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-07-06 11:33:03
 */
@Api(tags = "产品接口")
public interface TransferInfoService {

    @GetMapping("/findTransferInfoList")
    @ApiOperation(value = "分页查询")
    PageResult<TransferInfoEntity> queryPage(@RequestParam(value = "isDistribute", required = false) Integer isDistribute,
            @RequestParam(value = "keyword", required = false) String keyword,
                                             @RequestParam("orgIds") List<Long> orgIds,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize

    );

    @GetMapping("/findTransferInfoListByOriginal")
    @ApiOperation(value = "原生分页查询")
     PageResult<TransferInfoEntity> queryPage(@RequestParam(value ="transferType") Integer transferType,
                                              @RequestParam(value ="unitname")String unitname,
                                              @RequestParam(value ="orgname")String orgname,
                                              @RequestParam(value ="userCode")String userCode,
                                              @RequestParam(value ="name")String name,
                                              @RequestParam(value ="type") Integer type,
                                              @RequestParam(value ="dealStatus") Integer dealStatus,
                                              @RequestParam(value ="jobIds")List<Long> jobIds,
                                              @RequestParam(value ="jobSystemIds")List<Long> jobSystemIds,
                                              @RequestParam(value ="orgIds") List<Long> orgIds,
                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
    );

    @GetMapping("/infoTransferInfo")
    @ApiOperation(value = "根据id查找")
        TransferInfoEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveTransferInfo")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody TransferInfoEntity entity);

    @PostMapping("/updateTransferInfo")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody TransferInfoEntity entity);

    @GetMapping("/deleteOneTransferInfo")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteTransferInfos")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

